<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> 获取两个 set 的交集</title>
</head>
<body>
    <script>
        var a=new Set([11,2,3,1,5])
        var b=new Set([1,2,5,888,11,64,54,54])
        var num=new Set([...a].filter(z=>b.has(z)))
        console.log(num)
    </script>
</body>
</html>